<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<div id="menuImpiegato">
		<ui:include src="/pagine_impiegati/commonHeader.xhtml" />
	</div>
</h:head>

<h:body>	
<p:growl id="growl" showDetail="true" />  
<h:form id = "esc">
      <p:dataList  id = "escursione" value="#{escurBean.escursioni}" var="escursioneDTO"  
        paginator="true" rows="5"  
        paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink} {RowsPerPageDropdown}"  
        rowsPerPageTemplate="5,10,15" type="none">  
  
            <f:facet name="header">  
                Elenco Escursioni
            </f:facet>   
			 
          	
			<p:commandButton icon="ui-icon-trash" action="#{escurBean.confirmDel()}" update = ":esc:escursione"> 
				<f:setPropertyActionListener value="#{escursioneDTO}" target="#{escurBean.escursione}" />  
           		<p:confirm header="Conferma" message="Sei sicuro di cancellare l'escursione? (Se un prodotto è già presente in un pacchetto non verrà cancellato)" icon="ui-icon-alert" />  
          	</p:commandButton>  
          	
          	<h:outputText value = " #{escursioneDTO.nome}, #{escursioneDTO.citta}, #{escursioneDTO.prezzoSingolo} €, "/>
          	
          	<h:outputText value = "#{escursioneDTO.inizio}">
          		<f:convertDateTime type = "date"/>
          	</h:outputText>	
  
       <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">  
           <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check"/>  
           <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close"/>       
       </p:confirmDialog> 
			
            
            <br />  
    </p:dataList>  
 
  
</h:form>
</h:body>  	
</html>